package com.iplant.pdm.service.basicenum.fpc;

import com.iplant.base.po.enums.BaseEnum;

/**
 * 产品参数类型
 *
 * @author YouWang·Peng
 * 2023-8-23 15:17:36
 */
public enum FPCParamType implements BaseEnum {
    /**
     * 默认
     */
    Default(0, "默认"),
    /**
     * 工艺参数
     */
    PROCESS_PARAMETERS(1, "工艺参数"),
    /**
     * 质量参数
     */
    QUALITY_PARAMETERS(2, "质量参数"),
    /**
     * 环境参数
     */
    ENVIRONMENT_PARAMETERS(3, "环境参数");

    private int value;
    private String label;
    private String remark;

    FPCParamType(int value, String label) {
        this.value = value;
        this.label = label;
    }

    FPCParamType(int value, String label, String remark) {
        this.value = value;
        this.label = label;
        this.remark = remark;
    }

    /**
     * 通过 value 的数值获取枚举实例
     */
    public static FPCParamType getEnumType(int val) {
        for (FPCParamType type : FPCParamType.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}